﻿<%@ Page Title="Nhóm sản phẩm" Language="C#" MasterPageFile="~/Administration/BackEnd.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="MonkeyShop.Web.Administration.Categories.List" %>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <p></p>
    <input type="button" value="Thêm mới" onclick="javascript: window.location = 'New.aspx';" />
    <div id="CategoriesTableContainer">
    </div>
    <input type="button" value="Thêm mới" onclick="javascript: window.location = 'New.aspx';" />
    <script type="text/javascript">
        $(document).ready(function () {
            $('#CategoriesTableContainer').jtable({
                title: 'Nhóm sản phẩm"',
                paging: false,
                sorting: true,
                actions: {
                    listAction: 'List.aspx/CategoryList',
                    deleteAction: 'List.aspx/DeleteCategory'
                },
                fields: {
                    Id: {
                        key: true,
                        create: false,
                        edit: false,
                        list: false
                    },
                    Name: {
                        title: 'Tên nhóm SP',
                        width: '30%'
                    },
                    SortOrder: {
                        title: "Thứ tự"
                    },
                    Edit: {
                        title: '',
                        width: '1%',
                        display: function (data) {
                            return '<input title="Cập nhật" class="jtable-command-button jtable-edit-command-button" onclick="javascript:window.location=\'Edit.aspx?id=' + data.record.Id + '\';" />';
                        },
                        sorting: false
                    }
                }
            });
            
            $('#CategoriesTableContainer').jtable('load');
        });
    </script>
</asp:Content>
